package mvc.struts.annotation.util;

import java.util.Collection;
import java.util.Map;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;

public class CollectionUtil {

	/**
	 * 
	 * @param collection
	 * @return
	 */
	public static boolean isEmpty(Collection<?> collection)
	{
		return	CollectionUtils.isEmpty(collection);
	}
	
	/**
	 * 
	 * @param collection
	 * @return
	 */
	public static boolean isNotEmpty(Collection<?> collection) 
	{
		return	!isEmpty(collection);
	}
	
	/**
	 * 
	 * @param map
	 * @return
	 */
	public static boolean isEmpty(Map<?, ?> map)
	{
		return	MapUtils.isEmpty(map);
	}
	
	/**
	 * 
	 * @param map
	 * @return
	 */
	public static boolean isNotEmpty(Map<?,?> map)
	{
		return	!isEmpty(map);
	}
}
